package com.asa.login.model

import com.asa.common.net.ApiManager
import com.asa.common.net.BaseHttpResponse
import com.asa.common.net.NetModel
import com.asa.common.net.Result
import com.asa.common.viewmodel.BaseNetViewModel
import com.asa.login.entity.UserInfo
import com.asa.login.http.LoginService

/**
 * create By：anderson
 * on 2022/3/20
 * desc:
 */
class LoginModel:NetModel() {


    suspend fun loginAction(userName:String,pwd:String):Result<UserInfo>{
        return safeRequest {
            executeResponse( ApiManager.getApiService(LoginService::class.java).loginAction(userName,pwd))
        }
    }


}